<?php


use \Phalcon\Config as PhConfig;

$env = 'default';
if (@$_SERVER['HTTP_HOST'] == 'localhost') 
{
    $env = 'localhost';
}
else if ((@$_SERVER['HTTP_HOST'] == 'demo.behomebased.com.ph') || (@$_SERVER['HTTP_HOST'] == 'demo.behomebased.ph'))
{
    $env = 'demo';
}
else if ((@$_SERVER['HTTP_HOST'] == 'test.behomebased.com.ph') || (@$_SERVER['HTTP_HOST'] == 'test.behomebased.ph'))
{
    $env = 'test';
}
else if ((@$_SERVER['HTTP_HOST'] == 'www.behomebased.com.ph') || (@$_SERVER['HTTP_HOST'] == 'www.behomebased.ph'))
{
    $env = 'prod';
}
else if ((@$_SERVER['HTTP_HOST'] == 'devops.behomebased.com.ph') || (@$_SERVER['HTTP_HOST'] == 'devops.behomebased.ph'))
{
    $env = 'devops';
}

// add base uri environment here
$baseuri = array();
$baseuri['default']     = 'http://dev.behomebased.com.ph/';
$baseuri['localhost']   = 'http://localhost/behomebased-ph/behomebased.ph/';
$baseuri['demo']   = 'http://demo.behomebased.com.ph/';
$baseuri['test']   = 'http://test.behomebased.com.ph/';
$baseuri['prod']   = 'http://www.behomebased.ph/';
$baseuri['devops']   = 'http://devops.behomebased.com.ph/';



$database['localhost']['adapter']   = 'Mysql';
$database['localhost']['host']      = 'localhost';
$database['localhost']['username']  = 'morris014';
$database['localhost']['password']  = '7423346';
$database['localhost']['dbname']    = 'bh_db';

$database['default']['adapter']   = 'Mysql';
$database['default']['host']      = 'localhost';
$database['default']['username']  = 'morris014';
$database['default']['password']  = '7423346';
$database['default']['dbname']    = 'bh_db';



return new \Phalcon\Config(array(
    'database' => $database[$env],
    'application' => array(
        'controllersDir' => __DIR__ . '/../../app/controllers/',
        'modelsDir'      => __DIR__ . '/../../app/models/',
        'viewsDir'       => __DIR__ . '/../../app/views/',
        'pluginsDir'     => __DIR__ . '/../../app/plugins/',
        'libraryDir'     => __DIR__ . '/../../app/library/',
        'cacheDir'       => __DIR__ . '/../../app/cache/',
        'baseUri'        => $baseuri[$env],
    )
));
